Skip to content

perf: fix extreme lag (20x) when crafting in item-heavy area#8244

Merged
chaosvolt merged 1 commit intomainfrom
fix/8243/20x-crafting-speed-regression-after-8051
Feb 26, 2026
Merged

perf: fix extreme lag (20x) when crafting in item-heavy area#8244
chaosvolt merged 1 commit intomainfrom
fix/8243/20x-crafting-speed-regression-after-8051

Conversation

@scarf005
Copy link
Member

@scarf005 scarf005 commented Feb 25, 2026

Purpose of change (The Why)

fixes #8243

Describe the solution (The How)

  • Cache tool-speed multiplier in ACT_CRAFT activity and reuse it during craft turns.
  • Reuse cached tool multiplier in craft progress calculation instead of recomputing each update.
  • Initialize cache fields for both fresh craft start and resume paths.

Testing

image

spawn a vehicle, fill it with gazillion cargo, craft something. i used private save file from original issue raiser.

result: 32.7s -> 2.7s (12.11x, initial), 1.5s (21.8x, cached)

Checklist

Mandatory

@github-actions github-actions bot added src changes related to source code. tests changes related to tests labels Feb 25, 2026
@scarf005 scarf005 changed the title fix: cache tool speed multiplier during crafting perf: cache tool speed multiplier during crafting Feb 25, 2026
@scarf005 scarf005 marked this pull request as draft February 25, 2026 13:57
@scarf005 scarf005 marked this pull request as ready for review February 25, 2026 16:29
@scarf005 scarf005 force-pushed the fix/8243/20x-crafting-speed-regression-after-8051 branch from 36b41d5 to ce586ba Compare February 25, 2026 16:34
@github-actions github-actions bot removed the tests changes related to tests label Feb 25, 2026
@scarf005 scarf005 force-pushed the fix/8243/20x-crafting-speed-regression-after-8051 branch 2 times, most recently from 190f7c9 to c2194b5 Compare February 25, 2026 16:43
@scarf005 scarf005 requested a review from shmakota February 25, 2026 16:51
Assisted-by: gpt-5.3-codex on opencode
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
@scarf005 scarf005 force-pushed the fix/8243/20x-crafting-speed-regression-after-8051 branch from c2194b5 to 07f1b1a Compare February 25, 2026 16:51
@scarf005 scarf005 changed the title perf: cache tool speed multiplier during crafting perf: fix extreme lag (20x) when crafting in item-heavy area Feb 25, 2026
@chaosvolt chaosvolt merged commit c4a5fbf into main Feb 26, 2026
16 checks passed
@scarf005 scarf005 deleted the fix/8243/20x-crafting-speed-regression-after-8051 branch February 26, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

src changes related to source code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20x crafting speed regression after #8051

2 participants